home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
os2
/
te2_130t.arj
/
TE2INST.003
/
Button2.scr
< prev
next >
Wrap
Text File
|
1994-03-28
|
3KB
|
70 lines
/* ---------------------------------------------------------------------- */
/* Button1.Scr -- TE/2 REXX Syntax Script */
/* Copyright 1994, Oberon Software */
/* All rights reserved */
/* */
/* Sample script to document the use of TE2PWin */
/* */
/* ---------------------------------------------------------------------- */
Txt.0 = 40
Txt.1 = 'There are three main sections in the TE2PWin profile file that'
Txt.2 = 'you can customize. You can set the TE2PWin Window Title, you'
Txt.3 = 'can name the OS/2 pipe that TE2PWin will use to communicate with'
Txt.4 = 'TE/2, and you can set the TE2PWin button definitions.'
Txt.5 = ''
Txt.6 = 'The TITLE and PIPE keywords are straightforward, you simply place'
Txt.7 = 'the value you want on the line after the keyword.'
Txt.8 = ''
Txt.9 = 'Keywords B1 through B6 define the buttons and the syntax is slightly'
Txt.10 = 'more complex. Each of these lines should look something like:'
Txt.11 = ''
Txt.12 = ' Bx [""ButtonText""] ScriptCommand'
Txt.13 = ''
Txt.14 = 'The square brackets around ""ButtonText"" indicate that this is'
Txt.15 = 'optional, do NOT include the square brackets but DO include the'
Txt.16 = 'double quote marks as this is the clue to TE2PWin that there is'
Txt.17 = 'a button text definition. If you omit the button test, TE2PWin'
Txt.18 = 'places the button number on the button.'
Txt.19 = ''
Txt.20 = 'Press any key for more.'
Txt.21 = 'The ScriptCommand portion of the button definition is everything'
Txt.22 = 'that appears on the line after the Button Text if it exists or'
Txt.23 = 'after the keyword if not. This can be anything that you could'
Txt.24 = 'otherwise use in a TE/2 script. Normally, you will probably want'
Txt.25 = 'to write a script for each button and place a RUN() command for'
Txt.26 = 'it in the profile file.'
Txt.27 = ''
Txt.28 = 'For simpler commands, you can just use the command directly in'
Txt.29 = 'the button definition. When you do this, it may be handy to use'
Txt.30 = 'the ""&"" character to chain two or more commands. If you chain'
Txt.31 = 'the command WindowMinMax(2) at the beginning of a chain it will'
Txt.32 = 'ensure that TE/2 has the OS/2 input focus for the remainder of'
Txt.33 = 'the commands.'
Txt.34 = ''
Txt.35 = 'An couple examples of this would be:'
Txt.36 = ''
Txt.37 = ' B3 ""~GEnie"" WindowMinMax(2) & Dial(""GEnie"")'
Txt.38 = ' B4 ""E~xit"" WindowMinMax(2) & Exit(TRUE)'
Txt.39 = ''
Txt.40 = 'Press any key to clear this display and return control to TE/2.'
'WindowMinMax(2)'
'sprintf("[%ld", OpenDialog(0, 2, 23, 76, DLogNormAttr))'
h = substr(rc, 2)
do i = 1 to 20
'StrPut('i+1', 6, DLogNormAttr, "%s", "'Txt.i'")'
end
'getc()'
'CloseDialog('h')'
'sprintf("[%ld", OpenDialog(0, 2, 23, 76, DLogNormAttr))'
h = substr(rc, 2)
do i = 21 to 40
'StrPut('i+1-20', 6, DLogNormAttr, "%s", "'Txt.i'")'
end
'getc()'
'CloseDialog('h')'
exit 0